import  pyautogui 
import  time
import logging


if __name__ == '__main__':
    mousePos=pyautogui.position()
    pyautogui.moveTo(x=300,y=300,duration=0.25)
    key=input('选择功能: 1.做一次 2.循环到死 \n')
    print('key is a--------'+key)
    if key=='1':
        print('start--------')
        while True:
            pos=pyautogui.locateCenterOnScreen('1.png')
            if pos is not None:
                print('insert into --------')
                pyautogui.click(pos.x,pos.y,duration=0.25,clicks=1,interval=0.2,button="left")
                time.sleep(1)
                break
            time.sleep(1)
        input('请输入结束符：')

